<% content_for :thredded_page_title, t('thredded.nav.moderation') %>
<% content_for :thredded_page_id, 'thredded--pending-moderation' %>
<%= render 'nav' %>

<%= thredded_page do %>
  <%= content_tag :section, class: 'thredded--main-section' do %>
    <% if @last_moderated_record %>
      <div class="thredded--moderated-notice">
        <%= render 'post_moderation_record', post_moderation_record: @last_moderated_record %>
      </div>
    <% end %>
    <% if @posts.present? %>
      <%= render partial: 'post', collection: @posts %>
      <%= paginate @posts %>
    <% else %>
      <div class="thredded--empty">
        <h3 class="thredded--empty--title"><%= t 'thredded.moderation.pending.empty.title' %></h3>
        <p><%= t 'thredded.moderation.pending.empty.content' %></p>
      </div>
    <% end %>
  <% end %>
<% end %>
